import java.util.Scanner;

public class Solution {
    public static void main(String[] args) {
       /* Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int times = min_times(n);
        System.out.println(times);*/
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        triangle(n);
    }
    /*最小次数到Fibonacci数列*/
    private static int min_times(int num) {
        if(num < 2) {
            return 0;
        }
        int min = Integer.MAX_VALUE;
        int[] f = new int[num];
        f[0] = 0;
        f[1] = 1;
        for(int i = 2; i < num; i++) {
            f[i] = f[i-1] + f[i-2];
            if(f[i] > num) {
                min = Integer.min(min,f[i] - num);
                break;
            }
            min = Integer.min(min,num - f[i]);
        }
        return min;
    }
    /*杨辉三角*/
    private static void triangle(int n) {
        int[][] arr = new int[n+1][n+1];
        if(n == 1) {
            System.out.println(1);
            return;
        }
        arr[1][1] = 1;
        arr[2][1] = 1;
        arr[2][2] = 1;
        for(int i = 3; i <= n; i++) {
            for(int j = 1; j <= n; j++) {
                arr[i][j] = arr[i-1][j-1] + arr[i-1][j];
            }
        }
        for(int i = 1; i <= n; i++) {
            for(int j = 1; j <= n; j++) {
                if(arr[i][j] == 0) {
                    break;
                }
                if(arr[i][j] > 0 &&arr[i][j] < 10) {
                    System.out.print("    "+arr[i][j]);
                }else if(arr[i][j] >= 10 &&arr[i][j] < 100){
                    System.out.print("   "+arr[i][j]);
                }else if(arr[i][j] >= 100 &&arr[i][j] < 1000) {
                    System.out.print("  "+arr[i][j]);
                }else if(arr[i][j] >= 1000) {
                    System.out.print(" "+arr[i][j]);
                }
            }
            System.out.println();
        }
    }
}
